package com.cashmama.market.api.domain.enums;

/**
 * @program: market-api
 * @description
 * @author: frank
 * @create: 2020-01-02 14:47
 **/
public enum KycTypeEnum {

    AADHAAR("1", "MASKED E-AADHAAR"), // maskedEAadhaar
    PASSPORT("2", "PASSPORT"), // passport
    DRIVER_LICENSE("3", "DRIVER_LICENSE"), //dl
    VOTER_ID("4", "VOTER_ID"); //voter


    KycTypeEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    String type;
    String desc;

    public String getType() {
        return type;
    }

    public KycTypeEnum setType(String type) {
        this.type = type;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public KycTypeEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static KycTypeEnum getEnumByStatus(String type) {
        KycTypeEnum userKycTypeEnum = null;
        for (KycTypeEnum enumObj : KycTypeEnum.values()) {
            if (enumObj.getType().equals(type)) {
                userKycTypeEnum = enumObj;
                break;
            }
        }
        return userKycTypeEnum;
    }
}
